package com.example.uniappspringbootstartweb.service.Imp;

import com.example.uniappspringbootstartweb.entity.Comments;
import com.example.uniappspringbootstartweb.entity.Shares;
import com.example.uniappspringbootstartweb.mapper.CommentRepository;
import com.example.uniappspringbootstartweb.service.CommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author DELL
 */
@Service
public class CommentServiceImpl implements CommentService {
    @Autowired
    private CommentRepository commentRepository;
    @Override
    public List<Comments> getCommentByContentid(Long contentId) {
        return commentRepository.findByContentid(contentId);
    }
    @Override
    public Comments save(Comments comments) {
        return commentRepository.save(comments);
    }
}



